package com.xhl.controller;

import com.xhl.entity.Article;
import com.xhl.service.ArticleClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/article")
public class ArticleConsumerController {
    @Autowired
    private ArticleClientService articleClientService;

    @RequestMapping("/all")
    @CrossOrigin(allowedHeaders = "*", allowCredentials = "true")
    public List<Article> queryArticleAll(){
        return articleClientService.queryArticleAll();
    }
}
